import request from '@/config/axios'


// vxe表配置 API
export const TableConfigApi = {
  // 查询vxe表配置分页
  getTableConfigPage: async (params) => {
    return await request.get({ url: `/task/table-config/page`, params })
  },

  // 查询vxe表配置详情
  getTableConfig: async (id) => {
    return await request.get({ url: `/task/table-config/get?id=` + id })
  },
  //
  getTableConfigByTableName: async (tableName) => {
    return await request.get({ url: `/task/table-config/get/by/table?tableName=` + tableName })
  },

  // 新增vxe表配置
  createTableConfig: async (data) => {
    return await request.post({ url: `/task/table-config/create`, data })
  },

  // 修改vxe表配置
  updateTableConfig: async (data) => {
    return await request.put({ url: `/task/table-config/update`, data })
  },

  // 删除vxe表配置
  deleteTableConfig: async (id) => {
    return await request.delete({ url: `/task/table-config/delete?id=` + id })
  },

  // 导出vxe表配置 Excel
  exportTableConfig: async (params) => {
    return await request.download({ url: `/task/table-config/export-excel`, params })
  },
}
